package com.linkstec.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.linkstec.pojo.User;

@Mapper
@DS("db3")
public interface UserMapper {

    // 获取用户名单
    public List<User> getUser() throws Exception;

    // 流式获取用户名单
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 1000)
    public void getUser(ResultHandler<User> handler) throws Exception;

    // 根据id删除用户
    public void deleteUser(int id) throws Exception;

    // 新增用户
    public void addUser(User user) throws Exception;
}